﻿<%@ Page Title="" Language="C#" MasterPageFile="~/cms/cms.master" AutoEventWireup="true" CodeFile="Promotion.aspx.cs" Inherits="cms_Promotion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .top-heading
        {
            border-bottom: dotted 1px #b5b5b5;
            font-family: Arial, Helvetica, sans-serif;
            font-size: 22px;
            color: #1f81d5;
            line-height: 0px;
            padding-top: 15px;
            padding-bottom: 15px;
            clear: both;
        }
        .style1
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" Runat="Server">
    <div>
        <h1> Promotion Image</h1>
    </div>
    <div  align="center" style="margin:0 auto; text-algin:center;">
        <div style="text-align:left; padding-left:200px; padding-bottom:10px;">
            <asp:DropDownList ID="ddlType" runat="server" DataTextField="TypeName" 
                DataValueField="TypeId" AutoPostBack="True" 
                onselectedindexchanged="ddlType_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:Button ID="btnAddNewPromo" runat="server" Text="Add New Promotion" 
                PostBackUrl="~/cms/AddNewPromotionImage.aspx" />
        </div>
        <asp:DataList ID="dtlPromotion" runat="server" RepeatColumns="1" 
            BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" 
            CellPadding="3" CellSpacing="2" GridLines="Both" 
            onitemcommand="dtlPromotion_ItemCommand">
            <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
            <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
            <ItemStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
            <ItemTemplate>                
                <table>
                    <tr>
                        <td style="width:300px;">
                            <a href='<%# "AddNewPromotionImage.aspx?PromoId="+Eval("PromotionId") %>'>
                            <asp:Image ID="Image1" ImageUrl='<%# "~/images/HomeSlide/" + Eval("Image") %>' runat="server" Width="350px" />
                            </a>
                        </td>
                        <td style="width:100%; padding-left:10px;">
                            <span> <b>Promotion Description:</b>
                            <asp:Label ID="Label1" runat="server" Text='<%# Eval("PromotionDescription") %>'></asp:Label></span><br /><hr />
                            <b>Type Name:</b>
                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("TypeName") %>'></asp:Label><br /><hr />
                            <asp:HyperLink ID="HyperLink1" runat="server" 
                            NavigateUrl='<%# "AddNewPromotionImage.aspx?PromoId="+Eval("PromotionId") %>' Text="Edit ">
                            </asp:HyperLink>|
                            <asp:LinkButton ID="LinkButton1" CommandName="Delete" CommandArgument='<%# Eval("PromotionId") %>' runat="server" OnClientClick='return confirm("Are you want to delete this");' Text="Delete"></asp:LinkButton>
                        </td>
                    </tr>
                </table>
            </ItemTemplate>
            <SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
        </asp:DataList>
        <div style="text-align:left">
            <asp:Button ID="Button1" runat="server" Text="Add New Promotion" 
                PostBackUrl="~/cms/AddNewPromotionImage.aspx" />
        </div>
        
    </div>
</asp:Content>

